const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
const axisProps = require('../tw-lib-base/chart/axis-props')
const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  ...axisProps,
  ...datazoomProps,
  ...tooltipProps,

  data: {
    type: Array,
    default () {
      return [
        {
          "name": "文学",
          "value": 8,
          "max": 8
        }, {
          "name": "自然科学",
          "value": 168,
          "max": 1000
        }, {
          "name": "军事",
          "value": 618,
          "max": 1000
        }, {
          "name": "社会科学",
          "value": 68,
          "max": 1000
        }
      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },
  colors: {
    type: Array,
    default () {
      return [
        'rgba(57,89,255,1)',
        'rgba(46,200,207,1)',
        '#4ac7ff',
        '#2bd3bd',
        '#96e388',
        '#fecd63',
        '#1276ff',
        '#03d6ef',
        '#7114ff',
        '#b62ad1',
        '#f83818',
        '#ff9e13',
        '#ffc513',
        '#5bd917',
        '#17d9b2'
      ]
    },
    name: '调色板',
    nameTip: '图表按此处指定的值循环取色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 40
  },
  barBgColor: {
    type: String,
    default: 'rgba(24,31,68,1)',
    name: '柱背景颜色',
    filedType: 'color'
  },
  barWidth: {
    type: String,
    default: '15',
    name: '柱子宽度',
    filedType: 'string'
  },
  barRadiusWidth: {
    type: String,
    default: '30',
    name: '柱子圆角半径',
    filedType: 'string'
  },
  multColor: {
    type: Boolean,
    default: false,
    name: '多渐变色',
    filedType: 'switch'
  },

  ...nodata
}
